<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>常用工具</title>
        <link href="./tools/tool.ico" rel="icon"  type="image/x-icon">
        <link href="./tools/toolsite.css" rel="stylesheet" type="text/css">
        <script type="text/javascript" src="./tools/unixtime.js"></script>
        <script type="text/javascript" src="./tools/caculate.js"></script>
    </head>
    
    <body>
        <div class="wrap">
            <div class="main">
                <div class="box">
                    <div id="b_1">
                        <h2>
                            Unix时间戳(Unix timestamp)转换工具
                        </h2>
                        <div class="box1" style="text-align:left;padding-left:75px;padding-top:30px;/* height: 692px; */">
                            <div style="color:#006AAD;font-size:14px;">
                                现在的Unix时间戳(Unix timestamp)是&nbsp;&nbsp;&nbsp;
                                <span class="utspan" id="currentunixtime">
                                    1394428771
                                </span>
                                &nbsp;
                                <a href="#" onclick="startTimer();">
                                    <img src="./tools/kaishi.gif" width="16" height="16" alt="开始">
                                </a>
                                &nbsp;
                                <a href="#" onclick="stopTimer();">
                                    <img src="./tools/tingzhi.gif" width="16" height="16" alt="停止">
                                </a>
                                &nbsp;
                                <a href="#" onclick="currentTime();">
                                    <img src="./tools/shuaxin.gif" width="16" height="16" alt="刷新">
                                </a>
                                &nbsp;
                            </div>
                            <div class="info1">
                                <div class="utdiv">
                                    Unix时间戳(Unix timestamp) → 北京时间
                                </div>
                                <form name="unix2beijing" action="">
                                    <font color="black">
                                        Unix时间戳(Unix timestamp)
                                    </font>
                                    <input type="text" name="timestamp" id="firstTimestamp" class="input"
                                    size="30">
                                    <input type="button" value="转换" onclick="unix2human();" class="but2">
                                    <font color="black">
                                        北京时间
                                    </font>
                                    <input type="text" name="result" size="30" class="input" readonly="readonly">
                                </form>
                                <div class="utdiv">北京时间 → Unix时间戳(Unix timestamp)</div>
                                <form name="beijing2unix" action="">
                                    <font color="black">北京时间</font> 
                                    <input type="text" class="input" size="2" name="year" maxlength="4"> 年
                                    <input type="text" class="input" size="1" name="month" maxlength="2"> 月
                                    <input type="text" class="input" size="1" name="day" maxlength="2"> 日
                                    <input type="text" class="input" size="1" name="hour" maxlength="2"> 时
                                    <input type="text" class="input" size="1" name="minute" maxlength="2"> 分
                                    <input type="text" class="input" size="1" name="second" maxlength="2"> 秒 <input type="button" value="转换" class="but2" onclick="human2unix();">	
                                    <font color="black">Unix时间戳</font> 
                                    <input type="text" name="result" class="input" size="25" readonly="readonly">
                                </form>
                            </div>
                        </div>
                    </div>
                    <div class="box1" style="text-align:left;padding-left:75px;padding-top:30px;padding-bottom:30px;">
                        <div class="utdiv">表达式计算器</div>
                        <font color="black">表达式</font> 
                        <input id="txtExpression" type="text" name="timestamp"class="input" size="60"/>
                        <input id="btnSubit" type="button" value="计算" onclick="calc()" class="but2"/>
                        <font color="black">计算结果</font> 
                        <input id="txtResult" type="text" class="input" size="28" readonly="readonly">
                    </div>
                </div>
            </div>
            <div>
                <img src="./tools/gotop.gif" id="gotop" onclick="javascript:scroll(0,0);"
                style="right: 293px; display: none;">
            </div>
        </div>
    </body>

    <script type="text/javascript">
        currentTime();
        var timeNow = new Date();
        document.getElementById("firstTimestamp").value = Math.round(timeNow.getTime() / 1000);
    </script>
    
</html>
